import 'package:flutter/cupertino.dart';

import 'common/test_model_app.dart';
import 'common/test_route.dart';
import 'pages/context_test.dart';
import 'pages/debug_test.dart';
import 'pages/definition_test.dart';
import 'pages/example_test.dart';
import 'pages/expression_test.dart';
import 'pages/function_list.dart';
import 'pages/generated/sequence_test.dart';
import 'pages/indent_test.dart';
import 'pages/matcher_test.dart';
import 'pages/parser_test.dart';
import 'pages/reflection_test.dart';
import 'pages/regression_test.dart';
import 'pages/tutorial_test.dart';

void main() {
  final items = [
    //FunctionList
    MainItem('functions', "", route: "FunctionList"),
    //SWordCharPredicateTestPage
    MainItem('matcher_test', "", route: "MatcherTestPage"),
    MainItem('context_test', "", route: "ContextTestPage"),
    MainItem('debug_test', "", route: "DebugTestPage"),
    MainItem('definition_test', "", route: "DefinitionTestPage"),
    MainItem('example_test', "", route: "ExamTestPage"),
    MainItem('expression_test', "", route: "ExpressionTestPage"),
    MainItem('indent_test', "", route: "IndentTestPage"), //TutorialTestPage
    MainItem('reflection_test', "", route: "ReflectionTestPage"),
    MainItem('regression_test', "", route: "RegressionTestPage"),
    MainItem('tutorial_test', "", route: "TutorialTestPage"),
    MainItem('parset_test', "", route: "ParsetTestPage"),
    MainItem('sequence_test', "", route: "SequenceTestPage"),
  ];

  runApp(TestModelApp(
      appName: 'petitparser',
      data: TestRoute(
        items: items,
        routes: {
          "FunctionList": (context) {
            return FunctionList();
          },
          //SWordCharPredicateTestPage
          "MatcherTestPage": (context) {
            return MatcherTestPage("MatcherTestPage");
          },
          "ContextTestPage": (context) {
            return ContextTestPage("ContextTestPage");
          },
          "DebugTestPage": (context) {
            return DebugTestPage("DebugTestPage");
          },
          "DefinitionTestPage": (context) {
            return DefinitionTestPage("DefinitionTestPage");
          },
          "ExamTestPage": (context) {
            return ExamTestPage("ExamTestPage");
          },
          "ExpressionTestPage": (context) {
            return ExpressionTestPage("ExpressionTestPage");
          },
          "IndentTestPage": (context) {
            return IndentTestPage("IndentTestPage");
          },
          "ReflectionTestPage": (context) {
            return ReflectionTestPage("ReflectionTestPage");
          },
          "RegressionTestPage": (context) {
            return RegressionTestPage("RegressionTestPage");
          },
          "TutorialTestPage": (context) {
            return TutorialTestPage("TutorialTestPage");
          },
          "ParsetTestPage": (context) {
            return ParsetTestPage("ParsetTestPage");
          },
          "SequenceTestPage": (context) {
            return SequenceTestPage("SequenceTestPage");
          },
        },
      ))); //SequenceTestPage
}
